# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=dolphin-plugins
pkgver=23.08.4
pkgrel=0
pkgdesc="Extra Dolphin plugins"
url="https://www.kde.org/applications/system/dolphin/"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-2.0-or-later"
makedepends="
	dolphin-dev
	extra-cmake-modules
	ki18n5-dev
	kio5-dev
	ktexteditor5-dev
	ktextwidgets5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/sdk/dolphin-plugins.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/dolphin-plugins-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_svn=OFF # Broken "error: expected unqualified-id before '(' token"
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7cb3365221aabe411e1339230633a37d674c6e2a77e675f8a1d9c61928bd0d2b75e5d289ba8d7765bcbea47afea56e2b629726fbdcf6e0e4248c4380ce33f40e  dolphin-plugins-23.08.4.tar.xz
"
